﻿using UnityEngine;
using System.Collections;


public class ScreenGeneral : MonoBehaviour {
	public static float pieceX=Screen.width;
	public static float pieceY=Screen.height;
    [SerializeField]
    public CharacterModel gCharacter;
	[SerializeField]
	public UIToolkit uitoolkitMenus;
	[SerializeField]
	public UIToolkit uitoolkitInventory;
	public UIToolkit uitoolkitFonts;
    [SerializeField]
    public UIToolkit uiToolKitItems;
    [SerializeField]
    public Animation _animation;

    public static int MaxThrow = 0;
    public static bool ShowMessagePickUp=false;
    public static bool CanPickUp=false;
	public static Element CollisionElement;
    public static string message="";
    //private HUD mn;
    public static Character Neko;
    public static bool StartTalk = false;

	void Start() {
		Neko = gCharacter.GetCharacther();
		/*mn = new HUD();
		mn.UtMenu = this.uitoolkitMenus;
		mn.UtFonts = this.uitoolkitFonts;
		mn.UtInventory = this.uitoolkitInventory;
        mn.UtItems = this.uiToolKitItems;
        mn._animation = this._animation;
		mn.CreateHUD();*/
		//Test
		Element elBook = new Element();
		elBook.Name ="Book";
		elBook.Add(1);
		elBook.ImageUp ="Book.png";
		elBook.ImageDown ="Book.png";
		Neko.Grab(elBook);// .inInventory.AddElement(elBook);
        Element WhiteBag = new Element();
        WhiteBag.Name = "WhiteBag";
        WhiteBag.Add(99);
        WhiteBag.ImageUp = "BolsaBlanca.png";
        WhiteBag.ImageDown = "BolsaBlanca.png";
        Neko.Grab(WhiteBag);
	}
    /*
    void LateUpdate()
    {
        if (ShowMessagePickUp)
        {
            ShowMessagePickUp = false;
            StartCoroutine(Example());
        }
        if (!string.IsNullOrEmpty(message))
        {
            StartCoroutine(ShowMessage());
        }
    }
    
    private IEnumerator Example()
    {
        mn.RefreshHud();
        yield return new WaitForSeconds(20);
        CanPickUp = false;
        mn.RefreshHud();
    }

    private IEnumerator ShowMessage()
    {
        mn.RefreshHud();
        message = string.Empty;
        yield return new WaitForSeconds(3);
        mn.RefreshHud();
    }
    */
}
